import 'package:kq_flutter_widgets/widgets/pullDown/pull_down_menu_controller.dart';

import '../resources/l10n/kq_strings.dart';

/// 默认主题配置
const String kqThemeConfigId = 'KQ_THEME_CONFIG_ID';

class KqGlobal {
  static PullDownMenuController? pullDownMenuController;

  /// 组件库包名，组件库里面的图片引用需要用到这个
  static const String packageName = 'kq_flutter_widgets';

  /// 当前主题id，如果有多个主题时，切换这个
  static String themeConfigId = kqThemeConfigId;

  /// [KqTabBar] 左右滚动的开关的Mask，如果=true，则一定能滚动，否则根据控件里的[KqTabBar]的[scrollable]控制。
  static bool tabBarScrollable = false;

  // 下拉控制器
  static void setPullDownMenuController(PullDownMenuController controller) {
    pullDownMenuController = controller;
  }

  // 获取下拉控制器
  static PullDownMenuController? getPullDownMenuController() {
    return pullDownMenuController;
  }

  // 重制下拉恢复原始状态
  static resetPullDownMenu() {
    pullDownMenuController?.resetPullDownState();
  }

  /// 全局语言处理，默认只处理中文，其他语言请继承[KqBaseString]自行处理
  static KqBaseString Function()? globalString;
}
